cmake_minimum_required(VERSION 3.12)
project(theta_solver_nlopt)

# 设置C++标准
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# set(CMAKE_BUILD_TYPE Debug)
include_directories(include)
find_package(Eigen3 REQUIRED)
find_package(PythonLibs REQUIRED)
find_package(Python3 COMPONENTS Development NumPy)
find_package(NLopt REQUIRED)

# set(OSQP_INSTALL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/osqp/install")
# message(STATUS "Please make sure OSQP has beeninstalled to: ${OSQP_INSTALL_DIR}")
# list(APPEND CMAKE_PREFIX_PATH ${OSQP_INSTALL_DIR})
# find_package(OsqpEigen CONFIG REQUIRED)

# target_include_directories(./)
# 添加可执行文件
# add_executable(${PROJECT_NAME} main.cpp)

# target_include_directories(${PROJECT_NAME} PRIVATE ${Python3_INCLUDE_DIRS} ${Python3_NumPy_INCLUDE_DIRS} )

# target_link_libraries(${PROJECT_NAME} ${PYTHON_LIBRARIES} Eigen3::Eigen )

add_executable(${PROJECT_NAME} theta_solver_nlopt.cpp)

target_include_directories(${PROJECT_NAME} PRIVATE ${Python3_INCLUDE_DIRS} ${Python3_NumPy_INCLUDE_DIRS} )
target_link_libraries(${PROJECT_NAME} ${PYTHON_LIBRARIES} Eigen3::Eigen NLopt::nlopt)